package com.dgshanger.sanhxiaofeisc.mvp.model

import com.dgshanger.sanhxiaofeisc.common.AppApi
import com.dgshanger.sanhxiaofeisc.entity.MerchantEntity
import com.dgshanger.sanhxiaofeisc.mvp.contract.CollectibleListContract
import com.xx.baseutilslibrary.network.rx.RxHelper
import com.xx.baseutilslibrary.network.rx.RxHttpObserver

/**
 * Created by JacobHHH on 2018/5/11.
 */
class CollectibleListModel : CollectibleListContract.Model {

    override fun loadData(page: String?, httpObserver: RxHttpObserver<List<MerchantEntity>>?) {
        AppApi.Api().my_collects(page!!.toInt())
                .compose(RxHelper.io_main())
                .subscribe(httpObserver)
    }
}